package com.example.video.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import org.springframework.security.core.Authentication;


import java.io.Serial;
import java.io.Serializable;

/**
 * <p>
 *
 * </p>
 *
 * @author qiusuyang
 * @since 2024-04-13
 */
@Data
public class Account implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 账户名
     */
    private String name;

    /**
     * 平台
     */
    private String platform;

    /**
     * 账号主页链接
     */
    private String url;

    /**
     * 头像链接
     */
    private String avatarUrl;

    /**
     * 绑定的目标平台id
     */
    private String nextCursor;
    /**
     * 是否在用：1：在用 0：禁用
     */
    private Integer isActive;

    /**
     * 视频总数
     */
    private Integer total;

    /**
    * 对应语言
    * */
    private String language;

    /**
     * 待翻译语言
     */
    private String toLanguage;

    /**
     * 绑定的设备唯一标识
     * */
    private String deviceId;


    @TableField(exist = false)
    private Authentication authentication;

    /**
     * 所属角色
     */
    private String role;


    @Override
    public String toString() {
        return "Account{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", platform='" + platform + '\'' +
                ", url='" + url + '\'' +
                ", avatarUrl='" + avatarUrl + '\'' +
                ", nextCursor='" + nextCursor + '\'' +
                ", isActive=" + isActive +
                ", total=" + total +
                ", language='" + language + '\'' +
                ", toLanguage='" + toLanguage + '\'' +
                ", deviceId='" + deviceId + '\'' +
                ", role='" + role + '\'' +
                ", authentication=" + authentication +
                '}';
    }
}
